<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>IDA SDK: Switch info flags</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IDA SDK
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="files.html"><span>Header&#160;Files</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">Switch info flags</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Used by <a class="el" href="structswitch__info__t.html#af91e8581524884c4b29990f09c425102" title="Switch info flags ">switch_info_t::flags</a>. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gae81d0822a39c5126bd928bdab1974734"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#gae81d0822a39c5126bd928bdab1974734">SWI_SPARSE</a>&#160;&#160;&#160;0x00000001</td></tr>
<tr class="memdesc:gae81d0822a39c5126bd928bdab1974734"><td class="mdescLeft">&#160;</td><td class="mdescRight">sparse switch (value table present)  <a href="#gae81d0822a39c5126bd928bdab1974734">More...</a><br /></td></tr>
<tr class="separator:gae81d0822a39c5126bd928bdab1974734"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4ba1c2e6c577a0c4546528158ac0fb30"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga4ba1c2e6c577a0c4546528158ac0fb30"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#ga4ba1c2e6c577a0c4546528158ac0fb30">SWI_V32</a>&#160;&#160;&#160;0x00000002</td></tr>
<tr class="memdesc:ga4ba1c2e6c577a0c4546528158ac0fb30"><td class="mdescLeft">&#160;</td><td class="mdescRight">32-bit values in table <br /></td></tr>
<tr class="separator:ga4ba1c2e6c577a0c4546528158ac0fb30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf15fbbe94eabbce63815a41b56af3509"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf15fbbe94eabbce63815a41b56af3509"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#gaf15fbbe94eabbce63815a41b56af3509">SWI_J32</a>&#160;&#160;&#160;0x00000004</td></tr>
<tr class="memdesc:gaf15fbbe94eabbce63815a41b56af3509"><td class="mdescLeft">&#160;</td><td class="mdescRight">32-bit jump offsets <br /></td></tr>
<tr class="separator:gaf15fbbe94eabbce63815a41b56af3509"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf8b9130103df3084a267cddaa56d330"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabf8b9130103df3084a267cddaa56d330"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#gabf8b9130103df3084a267cddaa56d330">SWI_VSPLIT</a>&#160;&#160;&#160;0x00000008</td></tr>
<tr class="memdesc:gabf8b9130103df3084a267cddaa56d330"><td class="mdescLeft">&#160;</td><td class="mdescRight">value table is split (only for 32-bit values) <br /></td></tr>
<tr class="separator:gabf8b9130103df3084a267cddaa56d330"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9721965f0d710b727d764e92abc6d5d5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9721965f0d710b727d764e92abc6d5d5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#ga9721965f0d710b727d764e92abc6d5d5">SWI_DEFAULT</a>&#160;&#160;&#160;0x00000010</td></tr>
<tr class="memdesc:ga9721965f0d710b727d764e92abc6d5d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">default case is present <br /></td></tr>
<tr class="separator:ga9721965f0d710b727d764e92abc6d5d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga08514ce263bc78dde1a9f59f12111ef4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#ga08514ce263bc78dde1a9f59f12111ef4">SWI_DEF_IN_TBL</a>&#160;&#160;&#160;0x00000020</td></tr>
<tr class="memdesc:ga08514ce263bc78dde1a9f59f12111ef4"><td class="mdescLeft">&#160;</td><td class="mdescRight">default case is an entry in the jump table.  <a href="#ga08514ce263bc78dde1a9f59f12111ef4">More...</a><br /></td></tr>
<tr class="separator:ga08514ce263bc78dde1a9f59f12111ef4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gade6a06a60740d6733cfc689656a853d3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#gade6a06a60740d6733cfc689656a853d3">SWI_JMP_INV</a>&#160;&#160;&#160;0x00000040</td></tr>
<tr class="memdesc:gade6a06a60740d6733cfc689656a853d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">jumptable is inversed.  <a href="#gade6a06a60740d6733cfc689656a853d3">More...</a><br /></td></tr>
<tr class="separator:gade6a06a60740d6733cfc689656a853d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad5246a790b5bb73b4db415a5fc79952e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad5246a790b5bb73b4db415a5fc79952e"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#gad5246a790b5bb73b4db415a5fc79952e">SWI_SHIFT_MASK</a>&#160;&#160;&#160;0x00000180</td></tr>
<tr class="memdesc:gad5246a790b5bb73b4db415a5fc79952e"><td class="mdescLeft">&#160;</td><td class="mdescRight">use formula (element&lt;&lt;shift) + elbase to find jump targets <br /></td></tr>
<tr class="separator:gad5246a790b5bb73b4db415a5fc79952e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad0a2b6bfb276e22d63d5ab9e6b93990b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad0a2b6bfb276e22d63d5ab9e6b93990b"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#gad0a2b6bfb276e22d63d5ab9e6b93990b">SWI_ELBASE</a>&#160;&#160;&#160;0x00000200</td></tr>
<tr class="memdesc:gad0a2b6bfb276e22d63d5ab9e6b93990b"><td class="mdescLeft">&#160;</td><td class="mdescRight">elbase is present (if not and shift!=0, endof(jumpea) is used) <br /></td></tr>
<tr class="separator:gad0a2b6bfb276e22d63d5ab9e6b93990b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga907444cebdf9bfefc2bc16180c079f37"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga907444cebdf9bfefc2bc16180c079f37"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#ga907444cebdf9bfefc2bc16180c079f37">SWI_JSIZE</a>&#160;&#160;&#160;0x00000400</td></tr>
<tr class="memdesc:ga907444cebdf9bfefc2bc16180c079f37"><td class="mdescLeft">&#160;</td><td class="mdescRight">jump offset expansion bit <br /></td></tr>
<tr class="separator:ga907444cebdf9bfefc2bc16180c079f37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga38ce789ea9bf758f46f108b7323c3120"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga38ce789ea9bf758f46f108b7323c3120"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#ga38ce789ea9bf758f46f108b7323c3120">SWI_VSIZE</a>&#160;&#160;&#160;0x00000800</td></tr>
<tr class="memdesc:ga38ce789ea9bf758f46f108b7323c3120"><td class="mdescLeft">&#160;</td><td class="mdescRight">value table element size expansion bit <br /></td></tr>
<tr class="separator:ga38ce789ea9bf758f46f108b7323c3120"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga383dcd5693b6348d53ac5995f3ee5df9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga383dcd5693b6348d53ac5995f3ee5df9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#ga383dcd5693b6348d53ac5995f3ee5df9">SWI_SEPARATE</a>&#160;&#160;&#160;0x00001000</td></tr>
<tr class="memdesc:ga383dcd5693b6348d53ac5995f3ee5df9"><td class="mdescLeft">&#160;</td><td class="mdescRight">create an array of individual elements (otherwise separate items) <br /></td></tr>
<tr class="separator:ga383dcd5693b6348d53ac5995f3ee5df9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga656c35b54dae3628e0cea741ccdaab55"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga656c35b54dae3628e0cea741ccdaab55"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#ga656c35b54dae3628e0cea741ccdaab55">SWI_SIGNED</a>&#160;&#160;&#160;0x00002000</td></tr>
<tr class="memdesc:ga656c35b54dae3628e0cea741ccdaab55"><td class="mdescLeft">&#160;</td><td class="mdescRight">jump table entries are signed <br /></td></tr>
<tr class="separator:ga656c35b54dae3628e0cea741ccdaab55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c8b1cc7dc7face3d01f48b8e2b78135"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#ga9c8b1cc7dc7face3d01f48b8e2b78135">SWI_CUSTOM</a>&#160;&#160;&#160;0x00004000</td></tr>
<tr class="memdesc:ga9c8b1cc7dc7face3d01f48b8e2b78135"><td class="mdescLeft">&#160;</td><td class="mdescRight">custom jump table.  <a href="#ga9c8b1cc7dc7face3d01f48b8e2b78135">More...</a><br /></td></tr>
<tr class="separator:ga9c8b1cc7dc7face3d01f48b8e2b78135"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaacefe06f5ae5475f743eae54abeb2f91"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaacefe06f5ae5475f743eae54abeb2f91"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#gaacefe06f5ae5475f743eae54abeb2f91">SWI_INDIRECT</a>&#160;&#160;&#160;0x00010000</td></tr>
<tr class="memdesc:gaacefe06f5ae5475f743eae54abeb2f91"><td class="mdescLeft">&#160;</td><td class="mdescRight">value table elements are used as indexes into the jump table <br /></td></tr>
<tr class="separator:gaacefe06f5ae5475f743eae54abeb2f91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2be9d5f0c1518650d65d96804c658dde"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2be9d5f0c1518650d65d96804c658dde"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#ga2be9d5f0c1518650d65d96804c658dde">SWI_SUBTRACT</a>&#160;&#160;&#160;0x00020000</td></tr>
<tr class="memdesc:ga2be9d5f0c1518650d65d96804c658dde"><td class="mdescLeft">&#160;</td><td class="mdescRight">table values are subtracted from the elbase instead of being added <br /></td></tr>
<tr class="separator:ga2be9d5f0c1518650d65d96804c658dde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf3fe9f1770f40540a0a16f45a7053066"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf3fe9f1770f40540a0a16f45a7053066"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#gaf3fe9f1770f40540a0a16f45a7053066">SWI_HXNOLOWCASE</a>&#160;&#160;&#160;0x00040000</td></tr>
<tr class="memdesc:gaf3fe9f1770f40540a0a16f45a7053066"><td class="mdescLeft">&#160;</td><td class="mdescRight">lowcase value should not be used by the decompiler (internal flag) <br /></td></tr>
<tr class="separator:gaf3fe9f1770f40540a0a16f45a7053066"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae924695c96e5173af51edcaaf8ba94a9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#gae924695c96e5173af51edcaaf8ba94a9">SWI_STDTBL</a>&#160;&#160;&#160;0x00080000</td></tr>
<tr class="memdesc:gae924695c96e5173af51edcaaf8ba94a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">custom jump table with standard table formatting.  <a href="#gae924695c96e5173af51edcaaf8ba94a9">More...</a><br /></td></tr>
<tr class="separator:gae924695c96e5173af51edcaaf8ba94a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaca970cc96b47525ed98a5ff7f74fdba1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaca970cc96b47525ed98a5ff7f74fdba1"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___s_w_i__.html#gaca970cc96b47525ed98a5ff7f74fdba1">SWI_DEFRET</a>&#160;&#160;&#160;0x00100000</td></tr>
<tr class="memdesc:gaca970cc96b47525ed98a5ff7f74fdba1"><td class="mdescLeft">&#160;</td><td class="mdescRight">return in the default case (defjump==BADADDR) <br /></td></tr>
<tr class="separator:gaca970cc96b47525ed98a5ff7f74fdba1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="gae81d0822a39c5126bd928bdab1974734"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWI_SPARSE&#160;&#160;&#160;0x00000001</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>sparse switch (value table present) </p>
<p>otherwise lowcase present </p>

</div>
</div>
<a class="anchor" id="ga08514ce263bc78dde1a9f59f12111ef4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWI_DEF_IN_TBL&#160;&#160;&#160;0x00000020</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>default case is an entry in the jump table. </p>
<p>This flag is only applicable in the case of a sparse nonindirect switch (i.e. a switch with a values table). &lt;jump table="" size&gt;=""&gt; == </p>
<p>+ 1. The default case entry is the last one in the table (or the first one in the case of an inversed jump table). See also the find_defjump_from_table() helper function. </p>

</div>
</div>
<a class="anchor" id="gade6a06a60740d6733cfc689656a853d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWI_JMP_INV&#160;&#160;&#160;0x00000040</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>jumptable is inversed. </p>
<p>(last entry is for first entry in values table) </p>

</div>
</div>
<a class="anchor" id="ga9c8b1cc7dc7face3d01f48b8e2b78135"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWI_CUSTOM&#160;&#160;&#160;0x00004000</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>custom jump table. </p>
<p>processor_t::create_switch_xrefs will be called to create code xrefs for the table. Custom jump table must be created by the module (see also <a class="el" href="group___s_w_i__.html#gae924695c96e5173af51edcaaf8ba94a9" title="custom jump table with standard table formatting. ">SWI_STDTBL</a>) </p>

</div>
</div>
<a class="anchor" id="gae924695c96e5173af51edcaaf8ba94a9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWI_STDTBL&#160;&#160;&#160;0x00080000</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>custom jump table with standard table formatting. </p>
<p>ATM IDA doesn't use SWI_CUSTOM for switches with standard table formatting. So this flag can be considered as obsolete. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
